<template>
  <div class="admin-settings">
    <el-page-header @back="goBack" title="返回" content="管理员设置" />
    
    <div class="settings-container">
      <el-tabs type="border-card">
        <el-tab-pane label="网站统计">
          <site-stats />
        </el-tab-pane>
        <el-tab-pane label="页面权限设置">
          <page-permissions />
        </el-tab-pane>
        <el-tab-pane label="COS服务测试">
          <cos-test />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
import SiteStats from './components/SiteStats.vue';
import PagePermissions from './components/PagePermissions.vue';
import CosTest from '../common/CosTest.vue';

const router = useRouter();

const goBack = () => {
  router.push('/preview');
};
</script>

<style scoped>
.admin-settings {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  min-width: 1200px;
}

.settings-container {
  margin-top: 2rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

:deep(.el-tabs__header) {
  margin-bottom: 0;
}

:deep(.el-tabs__content) {
  padding: 20px;
}
</style> 